package com.ogilvy.audi.model;

import javax.persistence.*;

import java.util.Date;

/**
 * TblCircleUserExt entity. @author MyEclipse Persistence Tools
 */
@Entity
@Table(name="TBL_CIRCLE_USER_EXT")
 @org.hibernate.annotations.Table(appliesTo = "TBL_CIRCLE_USER_EXT", comment = " 用户扩展信息表 ")
public class CircleUserExt extends  BaseObject implements java.io.Serializable {

	// Fields

	private Long seqid;
	
	//private Long userseqid;
	
	private Long dealerId;
	private String contactMobile;
	private String contactTel;
	//推荐购车人
	private String vehicleOwner;
	
	private String carVin;
	
	//车辆拥状态
	private Long ownerStatus;
	
	private Long brandId;
	
	
	private Long modelId;
	private Long isBuy;
	
	//意向购买车型
	private String buyModel;
	
	
	private Date buyTime;
    private Integer version;

    private CircleUser circleUser;
	// Constructors

	/** default constructor */
	public CircleUserExt() {
	}

	/** minimal constructor */
	/*public CircleUserExt(Long userseqid) {
		this.userseqid = userseqid;
	}*/

	/** full constructor */
	public CircleUserExt(/*Long userseqid,*/ Long dealerId,
                         String contactMobile, String contactTel, String vehicleOwner,
                         String carVin, Long ownerStatus, Long brandId, Long modelId,
                         Long isBuy, String buyModel, Date buyTime) {
		//this.userseqid = userseqid;
		this.dealerId = dealerId;
		this.contactMobile = contactMobile;
		this.contactTel = contactTel;
		this.vehicleOwner = vehicleOwner;
		this.carVin = carVin;
		this.ownerStatus = ownerStatus;
		this.brandId = brandId;
		this.modelId = modelId;
		this.isBuy = isBuy;
		this.buyModel = buyModel;
		this.buyTime = buyTime;
	}

	// Property accessors
        @Id
    @GeneratedValue(strategy = GenerationType.AUTO)
	public Long getSeqid() {
		return this.seqid;
	}

	public void setSeqid(Long seqid) {
		this.seqid = seqid;
	}
	
    /* @Column(length = 50)
	public Long getUserseqid() {
		return this.userseqid;
	}

	public void setUserseqid(Long userseqid) {
		this.userseqid = userseqid;
	}*/
	
   @Column(length = 50)
	public Long getDealerId() {
		return this.dealerId;
	}

	public void setDealerId(Long dealerId) {
		this.dealerId = dealerId;
	}
     @Column(length = 50)
	public String getContactMobile() {
		return this.contactMobile;
	}

	public void setContactMobile(String contactMobile) {
		this.contactMobile = contactMobile;
	}
  @Column(length = 50)
	public String getContactTel() {
		return this.contactTel;
	}

	public void setContactTel(String contactTel) {
		this.contactTel = contactTel;
	}
      @Column(length = 50)
	public String getVehicleOwner() {
		return this.vehicleOwner;
	}

	public void setVehicleOwner(String vehicleOwner) {
		this.vehicleOwner = vehicleOwner;
	}
       @Column(length = 50)
	public String getCarVin() {
		return this.carVin;
	}

	public void setCarVin(String carVin) {
		this.carVin = carVin;
	}
     @Column(length = 50)
	public Long getOwnerStatus() {
		return this.ownerStatus;
	}

	public void setOwnerStatus(Long ownerStatus) {
		this.ownerStatus = ownerStatus;
	}
     @Column(length = 50)
	public Long getBrandId() {
		return this.brandId;
	}

	public void setBrandId(Long brandId) {
		this.brandId = brandId;
	}
     @Column(length = 50)
	public Long getModelId() {
		return this.modelId;
	}

	public void setModelId(Long modelId) {
		this.modelId = modelId;
	}
   @Column(length = 50)
	public Long getIsBuy() {
		return this.isBuy;
	}

	public void setIsBuy(Long isBuy) {
		this.isBuy = isBuy;
	}
      @Column(length = 50)
	public String getBuyModel() {
		return this.buyModel;
	}

	public void setBuyModel(String buyModel) {
		this.buyModel = buyModel;
	}
       @Column(length =8)
	@Temporal(value= TemporalType.TIMESTAMP)
    public Date getBuyTime() {
        return buyTime;
    }

    public void setBuyTime(Date buyTime) {
        this.buyTime = buyTime;
    }
     @Version
    public Integer getVersion() {
        return version;
    }

    public void setVersion(Integer version) {
        this.version = version;
    }
   	

    @OneToOne(cascade = CascadeType.ALL,fetch = FetchType.LAZY)
	@JoinColumn(name = "userseqid")
    public CircleUser getCircleUser() {
        return circleUser;
    }

    public void setCircleUser(CircleUser circleUser) {
        this.circleUser = circleUser;
    }

    @Override
    public String toString() {
        return null;  //To change body of implemented methods use File | Settings | File Templates.
    }

    @Override
    public boolean equals(Object o) {
        return false;  //To change body of implemented methods use File | Settings | File Templates.
    }

    @Override
    public int hashCode() {
        return 0;  //To change body of implemented methods use File | Settings | File Templates.
    }
}